#include<iostream>
using namespace std;
class Clock
	{
		Clock();//调用构造函数
		void setTime(int newH,int newM,int newS);//调用设置时间的函数
		void showTime() ;
		private: //私有数据成员
            int hour, minute, second;
	};
Clock::Clock():hour(0),minute(0),second(0){
	};//构造函数
void Clock::setTime(int newH, int newM, int newS) { //三个形参均具有局部作用域
    hour = newH;
    minute = newM;
	second = newS;
}
void Clock::showTime() {

cout << hour << ": " << minute << ": " << second <<
endl;
}
Clock globClock; //声明对象globClock，
//具有静态生存期， 文件作用域
int main()//主函数
{
	cout << "First time output: " << endl;
	globClock.showTime();
	globClock.setTime(10,25,36);//自定义时钟
	Clock myclock(globClock);
	cout << "Second time output: " << endl;
	myclock.showTime();
	return 0;


}

